I'm trying to parse the subtitles from a Brazilian live ISDB-T Capture.
I parsed the PMT, and it had a Data Component Descriptor present for the corresponding PID.
The Data Component Descriptor said 0x0012 for it's data_component_id.
According to Annex J in ARIB STD-B10, Part 3 this means "Subtitle coding for digital terrestrial broadcasting (C profile)" and points to ARIB STD-B24, Part 3, Volume 1.
So I checked ARIB STD-B24 Version 6.4 Fascicle 1, Part 3, Chapter 9.
This states that the captions are transmitted in PES packets, so I coded my program to attach a PES listener to the corresponding PID. 
As expected, I get valid PES packets from it.
But the structure from the payload does not match what I find in ARIB STD-B24 Version 6.4 Fascicle 1, Part 3, Clause 9.2
The first bytes I got are 0x80 0xFF 0xF0 0x04 0x00 0x00 0x00 0x87
Bytes 1 & 2 in the standard say that they're data_group_link_number and last_data_group_link_number.
But that doesn't fit. 0x0F0 would be the last data group link number, but it's smaller than 0xFF.
I think I am looking in the wrong spot. Could you give me a small push in the right direction?

-

Okay, I think I got a few bytes.
The first three bytes 0x80, 0xFF, 0xF0 can be explained using ARIB TR-B14 Fascicle 3, clause 6.2.2 and ARIB STD-B37, clause 2.2.3.6
These are indeed a data_identifier, private_stream_id, reserved bits, and pes_data_packet_header_length, but now I still need to figure out the next four bytes: 0x00, 0x00, 0x00, 0x87. The 0x87 seems to indeed be the length of the packet.
